#ifndef _INTERFACE_H
#define _INTERFACE_H

//动态通讯
							
#define REG_DATA_CMD						0X60
#define REG_DATA_LEN						0X61
#define REG_DATA							0X62

#define REG_MODE_DEBUG_DATA					0xF5//raw data with crc16
#define REG_MODE_CAL_DATA					0x14//校准数据

//静态通讯
#define REG_STATIC_READ_FORCE_CMD           0X21//force 
#define REG_FW_VERSION_CMD			        0X10//版本号
#define REG_READ_OFFSET_CMD			        0x17//offset
#define REG_READ_CAL_FACTOR_CMD             0X24//校准系数
#define REG_READ_ORI_ADC_CMD				0X22//校准系数
//握手命令
#define REG_HANDSHAKE						0X01
#define REG_BUTTON_FORCE_TRI				0X5B//更新按键阈值
#define REG_CAL_START_CMD					0x12//开始校准
#define REG_CAL_END_CMD						0x13//结束校准
#define REG_SYS_RESET_CMD					0x02//系统复位
#define REG_SYS_SLEEP_CMD					0x06//休眠
#define REG_SYS_WAKEUP_CMD					0x05//唤醒             
#define REG_SET_CAL_FACTOR_CMD				0x24//更新校准系数  


extern void Hal_Event_Delect();
extern void Interface_Proc(void);

void Update_Cal_Factor();

#endif

